package com.learn.step08freemarker;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 用于测试mvc的类
 * Created by Vince on 2016/3/1.
 */
@Controller
@RequestMapping("/")
public class HelloIndexController {

    //根目录
    @RequestMapping(method = RequestMethod.GET)
    public String index(Model model){
        model.addAttribute("name", "webster");
        return "index";
    }
}
